DrillShape DrillShapeBounday

Compute the minimum bounding rectangle covering all the drill points

public bool DrillShapeBounday(GsiRectangle shapeBoundary)

 

Parameters

GsiRectangle shapeBoundary Object to receive the calculated boundary

 

Return value

bool Return True if a valid boundary exists.

 

Example

Copy
bool pulsemode = false;
PointAndShootDrillShapePattern pointandShootPattern = new PointAndShootDrillShapePattern();
pointandShootPattern.UsePulseBurstMode = pulsemode;

// Create a Drill Pulse
DrillPulse pulse1 = new DrillPulse(2.5f, 2.5f, 5);

pointandShootPattern.AddDrillPulse(pulse1);

//Create a drill shape.
DrillShape drillShape = new DrillShape();
drillShape.SetPattern(pointandShootPattern);

//Add drill Points to the drill shape
drillShape.AddPointAndShootPoint(0, 0, 0);
drillShape.AddPointAndShootPoint(10, 10, 0);
drillShape.AddPointAndShootPoint(20, 20, 0);

// Add the Drill shape to vector image
vectorImage.AddDrill(drillShape);
GsiRectangle shapeBoundary = new GsiRectangle();

if (drillShape.DrillShapeBounday(shapeBoundary))
{
    drillShape.MoveShape(10f, 10f);
}